print("_____________lua调用C#的数组_____________")
U=CS.UnityEngine

local Lesson3=CS.Lesson3
local obj=Lesson3()

print(obj.array.Length)
print(obj.array[1])
for i = 0, obj.array.Length-1 do
    print(obj.array[i])
end

--lua中创建数组
print("lua中创建数组")
local array2=CS.System.Array.CreateInstance(typeof(CS.System.Int32),10)
print(array2.Length)

obj.list:Add(10)
obj.list:Add(11)
obj.list:Add(12)
for i = 0, obj.list.Count-1 do
    print(obj.list[i])
end

print("lua中创建List")
local List_String=CS.System.Collections.Generic.List(CS.System.String)
print(List_String)
local list2=List_String()
print(list2)
list2:Add("444")
print(list2[0])

print("___Dic___")
obj.dic:Add("hyu",21)
obj.dic:Add("aaa",2018)
for i, v in pairs(obj.dic) do
    print(i.."---"..v)
end

print("lua中创建Dic")
local Dic_String_Vector3=CS.System.Collections.Generic.Dictionary(CS.System.String,U.Vector3)
local dic2=Dic_String_Vector3()
dic2:Add("up",U.Vector3.up)
print(dic2)
print(dic2["up"])--nil\
for i, v in pairs(dic2) do
    print(i,v)
end
print(dic2:get_Item("up"))
print(dic2:TryGetValue("up"))